package com.zhixianggou.caibaobox.lottery.dataCollect.cover;

import com.zhixianggou.caibaobox.lottery.dataCollect.dto.SLotteryDto;
import com.zhixianggou.caibaobox.lottery.dataCollect.dto.WLotteryDto;
import com.zhixianggou.caibaobox.lottery.dataCollect.entities.*;
import com.zhixianggou.caibaobox.lottery.dataShow.vo.SLotteryDataVo;
import com.zhixianggou.caibaobox.lottery.dataShow.vo.WLotteryDataVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author zyq
 * 8/22/24 6:06 PM
 */
@Mapper(uses = {AttributeConvertUtil.class})
public interface WLotteryCover {

    WLotteryCover INSTANCE = Mappers.getMapper(WLotteryCover.class);

    @Mappings({
            @Mapping(target = "date", source = "date",qualifiedByName = "asDate"),
            @Mapping(target = "poolMoney", source = "poolmoney",qualifiedByName = "asDate"),
    })
    WSsq toSSQPo(WLotteryDto dto);
    List<WSsq> toSSQPo(List<WLotteryDto> dtoList);
    @Mappings({
            @Mapping(target = "date", source = "date",qualifiedByName = "asDate"),
            @Mapping(target = "poolMoney", source = "poolmoney",qualifiedByName = "asDate"),

    })
    WKl8 toKL8Po(WLotteryDto dto);
    List<WKl8> toKL8Po(List<WLotteryDto> dtoList);
    @Mappings({
            @Mapping(target = "date", source = "date",qualifiedByName = "asDate"),
            @Mapping(target = "poolMoney", source = "poolmoney",qualifiedByName = "asDate"),

    })
    W3d to3dPo(WLotteryDto dto);
    List<W3d> to3dPo(List<WLotteryDto> dtoList);
    @Mappings({
            @Mapping(target = "date", source = "date",qualifiedByName = "asDate"),
            @Mapping(target = "poolMoney", source = "poolmoney",qualifiedByName = "asDate"),

    })
    WQlc toWQlcPo(WLotteryDto dto);
    List<WQlc> toWQlcPo(List<WLotteryDto> dtoList);

    @Mappings({
            @Mapping(target = "prizeGrades", source = "prizegrades",qualifiedByName = "strToList4WL"),

    })
    WLotteryDataVo ssq2Vo(WSsq po);
    List<WLotteryDataVo> ssq2Vo(List<WSsq> poList);

    @Mappings({
            @Mapping(target = "prizeGrades", source = "prizegrades",qualifiedByName = "strToList4WL"),
    })
    WLotteryDataVo w3d2Vo(W3d po);
    List<WLotteryDataVo> w3d2Vo(List<W3d> poList);

    @Mappings({
            @Mapping(target = "prizeGrades", source = "prizegrades",qualifiedByName = "strToList4WL"),
    })
    WLotteryDataVo wkl82Vo(WKl8 po);
    List<WLotteryDataVo> wkl82Vo(List<WKl8> poList);

    @Mappings({
            @Mapping(target = "prizeGrades", source = "prizegrades",qualifiedByName = "strToList4WL"),
    })
    WLotteryDataVo wQlc2Vo(WQlc po);
    List<WLotteryDataVo> wQlc2Vo(List<WQlc> poList);

}
